import time
import uuid
from hashlib import md5


def uid(string):
    data = "{}-{}".format(str(uuid.uuid4()), string)
    return md5(data.encode()).hexdigest()


def getname(n):
    return uid(str(time.time()))[:n]
